package com.aw.guiguzi.util

import android.app.Activity
import android.content.Intent
import com.aw.baselib.base.AwBaseApplication
import com.aw.guiguzi.base.MyApp
import com.aw.guiguzi.module.common.LoginActivity
import com.aw.guiguzi.util.AppUserUtil.clearToken

object ReLoginUtil {
    fun reLogin(activity: Activity) {
        clearToken()
        activity.startActivity(Intent(activity, LoginActivity::class.java))
        activity.finish()
    }

    fun finishToLogin(activity: Activity) {
        clearToken()
        activity.finish()
    }

    val isAllowHandleReLogin: Boolean
        get() = AwBaseApplication.currentActivity?.javaClass?.name != LoginActivity::class.java.name
}